class G: pass

class D(G): pass


class E(G): pass


class F(G): pass


class B(D, E): pass


class C(E, F): pass


class A(B, C): pass


print(A.__mro__)
for i in A.__mro__:
    print(i)
